<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorator="manage/manage_layout_sub">

<head>
    <title>公告管理-修改</title>
</head>

<body class="manage manage-notice">

<div layout:fragment="content">
    <div class="container">
        <form class="form-horizontal" onsubmit="return false;">
            <div class="form-group">
                <label for="noticeId" class="col-sm-2 control-label">公告ID：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="noticeId" name="noticeId" placeholder=""
                           th:value="${noticeInfo.noticeId}" Readonly>
                </div>
            </div>
            <div class="form-group">
                <label for="noticeName" class="col-sm-2 control-label">公告名称：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="noticeName" name="noticeName" placeholder=""
                           th:value="${noticeInfo.noticeName}">
                </div>
            </div>
            <div class="form-group">
                <label for="noticeContent" class="col-sm-2 control-label">公告内容：</label>
                <div class="col-sm-10">
                    <script id="noticeContent" name="noticeContent" type="text/plain"
                            th:utext="${noticeInfo.noticeContent}">
                    </script>
                </div>
            </div>
            <div class="form-group">
                <label for="status" class="col-sm-2 control-label">公告状态：</label>
                <div class="col-sm-10">
                    <select id="status" name="status" class="form-control">
                        <option value="">请选择状态</option>
                        <option value="1" th:selected="(${noticeInfo.status} == 1)">上线</option>
                        <option value="0" th:selected="(${noticeInfo.status} == 0)">下线</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="noticeType" class="col-sm-2 control-label">公告类型：</label>
                <div class="col-sm-10">
                    <select id="noticeType" name="noticeType" class="form-control">
                        <option value="">请选择类型</option>
                        <option value="1" th:selected="(${noticeInfo.noticeType} == 1)">登录公告</option>
                        <option value="2" th:selected="(${noticeInfo.noticeType} == 2)">首页公告</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="startTime" class="col-sm-2 control-label">开始时间：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="startTime" name="startTime" placeholder=""
                           th:value="${noticeInfo.startTime}">
                </div>
            </div>
            <div class="form-group">
                <label for="endTime" class="col-sm-2 control-label">结束时间：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="endTime" name="endTime" placeholder=""
                           th:value="${noticeInfo.endTime}">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-4 col-sm-2">
                    <button type="submit" class="btn btn-primary">保存</button>
                    <button type="reset" class="btn btn-default" id="resetBtn">重置</button>
                </div>
            </div>
        </form>

    </div>

    <script th:replace="common/common_libs::commonjs"></script>
    <script src="/js/manage/notice.js"></script>
    <script>
        initNoticeModifyPage();
    </script>
</div>

</body>
</html>